﻿$(document).ready(function() {
    $(".MainGrid tr:has(input)").attr("title", "双击选定").css("cursor", "pointer").hover(function() { $(this).css("backgroundColor", "#E7F2FF"); }, function() { $(this).css("backgroundColor", "#FFF"); }).dblclick(function() {
        var selectedValue = $(this).find(".BindFieldText").attr("value");
        var targetID = $.getQueryString("id");
        if (targetID != "" && window.top != window) {
            window.parent.window.$("#" + targetID).attr("value", selectedValue);
            window.parent.window.closeFrame();
        }
    });
    $(".SelectButton").click(function() {
        var selectedValue = $(this).prev().attr("value");
        var targetID = $.getQueryString("id");
        if (targetID != "" && window.top != window) {
            window.parent.window.$("#" + targetID).attr("value", selectedValue);
            window.parent.window.closeFrame();
        };
    });
});